<?php
/**
 * 退出登录
 */
namespace app\weapp\module\user;

use app\common\InstanceTrait;
use app\common\Redis;
use app\core\user\UserModel;
use const app\polymerize\user\module\user\_MSG_SYSTEM_SUCCESS;
use const app\polymerize\user\module\user\_USER_TOKEN_LOGIN;

class Logout
{
    use InstanceTrait;

    public function logout($token)
    {
        if (isset($header["auth-token"])) {
            Redis::getInstance()->redisDel(_USER_TOKEN_LOGIN . $token);
        }

        return [_MSG_SYSTEM_SUCCESS, '退出登录成功', []];
    }
}
